<?php

namespace Core;

class Database extends \Core\Urclass {

    protected $connection;

    public function __construct($databaseSet) {
        parent::__construct(__CLASS__);
        
        $this->connection = mysql_connect($databaseSet['host'], $databaseSet['user'], $databaseSet['password'], TRUE);
  	mysql_select_db($databaseSet['database'], $this->connection);
    }

    public function disconnect() {
        if (is_resource($this->connection))
        mysql_close($this->connection);
    }

}